import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';

import { AppController } from './app.controller';
import { AppService } from './app.service';
import { DatabaseModule } from './database/database.module';
import { WechatModule } from './modules/wechat/wechat.module';
import { EmailService } from './modules/email/email.service';

@Module({
  imports: [
    DatabaseModule,
    ConfigModule.forRoot({
      isGlobal: true,
      envFilePath: '.env', // 指定环境变量文件路径
    }),
    WechatModule,
    EmailService,
  ],
  controllers: [AppController],
  providers: [AppService, ConfigService],
})
export class AppModule {}
